package cn.kgc.service.impl;

import cn.kgc.dao.OrderMapper;
import cn.kgc.pojo.PoOrder;
import cn.kgc.pojo.SoOrder;
import cn.kgc.service.OrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderMapper orderMapper;

    @Override
    public Integer addSoOrder(SoOrder soOrder) {
        return orderMapper.addSoOrder(soOrder);
    }

    @Override
    public SoOrder queryByIdSoOrder(String id) {
        return orderMapper.queryByIdSoOrder(id);
    }

    @Override
    public Integer updateSoOrder(String soOrderId) {
        return orderMapper.updateSoOrder(soOrderId);
    }

    @Override
    public Integer deleteSoOrder(String soOrderId) {
        return orderMapper.deleteSoOrder(soOrderId);
    }

    @Override
    public List<SoOrder> querySoOrder(String soOrderId, String soOrderName, Integer pageNum, Integer pageSize) {
        return orderMapper.querySoOrder(soOrderId, soOrderName, pageNum, pageSize);
    }

    @Override
    public Integer addPoOrder(PoOrder poOrder) {
        return orderMapper.addPoOrder(poOrder);
    }

    @Override
    public PoOrder queryByIdPoOrder(String id) {
        return orderMapper.queryByIdPoOrder(id);
    }

    @Override
    public Integer updatePoOrder(String poOrderId) {
        return orderMapper.updatePoOrder(poOrderId);
    }

    @Override
    public Integer deletePoOrder(String poOrderId) {
        return orderMapper.deletePoOrder(poOrderId);
    }

    @Override
    public List<PoOrder> queryPoOrder(String poOrderId, String poOrderName, Integer pageNum, Integer pageSize) {
        return orderMapper.queryPoOrder(poOrderId, poOrderName, pageNum, pageSize);
    }
}
